// 模拟树数据
export const mockTreeData = [
  {
    title: '部门A',
    key: '0-0',
    children: [
      {
        title: '团队A-1',
        key: '0-0-0',
        children: [
          { title: '成员A-1-1', key: '0-0-0-0' },
          { title: '成员A-1-2', key: '0-0-0-1' },
          { title: '成员A-1-3', key: '0-0-0-2' }
        ]
      },
      {
        title: '团队A-2',
        key: '0-0-1',
        children: [
          { title: '成员A-2-1', key: '0-0-1-0' },
          { title: '成员A-2-2', key: '0-0-1-1' }
        ]
      },
      {
        title: '团队A-3',
        key: '0-0-2',
        children: [
          { title: '成员A-3-1', key: '0-0-2-0' },
          { title: '成员A-3-2', key: '0-0-2-1' },
          { 
            title: '成员A-3-3', 
            key: '0-0-2-2', 
            children: [
              { 
                title: '成员A-3-3-1', 
                key: '0-0-2-2-0', 
                children: [
                  { 
                    title: '成员A-3-3-1-1', 
                    key: '0-0-2-2-0-0', 
                    children: [
                      { title: '成员A-3-3-1-1-1', key: '0-0-2-2-0-0-0' }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  {
    title: '部门B',
    key: '0-1',
    children: [
      {
        title: '团队B-1',
        key: '0-1-0',
        children: [
          { title: '成员B-1-1', key: '0-1-0-0' },
          { title: '成员B-1-2', key: '0-1-0-1' }
        ]
      },
      {
        title: '团队B-2',
        key: '0-1-1',
        children: [
          { title: '成员B-2-1', key: '0-1-1-0' },
          { title: '成员B-2-2', key: '0-1-1-1' }
        ]
      }
    ]
  },
  {
    title: '部门C',
    key: '0-2',
    children: [
      {
        title: '团队C-1',
        key: '0-2-0',
        children: [
          { title: '成员C-1-1', key: '0-2-0-0' },
          { title: '成员C-1-2', key: '0-2-0-1' }
        ]
      },
      {
        title: '团队C-2',
        key: '0-2-1',
        children: [
          { title: '成员C-2-1', key: '0-2-1-0' },
          { title: '成员C-2-2', key: '0-2-1-1' }
        ]
      }
    ]
  }
];

// 模拟获取树数据的API
export const getTreeData = () => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve(mockTreeData);
    }, 500);
  });
};

// 模拟更新树数据的API
export const updateTreeData = (newData) => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve({ success: true, message: '数据更新成功' });
    }, 500);
  });
}; 